#!/usr/bin/env python

import wx
import resources.toolbars as rTool
from .._toolBarToolBase import ToolBarToolBase

class ToolBar(wx.ToolBar):
    '''ToolBar class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 02, 2012. 11:00 PM'''
    
    def __init__(self, parent):
        style = wx.TB_HORIZONTAL | wx.TB_FLAT
        super(ToolBar, self).__init__(parent, style=style)
        self.SetToolBitmapSize((16, 16))
        
        tool = ToolBarToolBase
        
        self.open = tool(self, rTool.FolderHorizontalOpen.Bitmap,
                          'Open', 'Open')
        
        self.AddStretchableSpace()
        
        text = wx.StaticText(self, label='Zoom Time: ')
        self.AddControl(text)
        
        choices = ['1', '2', '5', '10', '20']
        style = wx.CB_DROPDOWN | wx.CB_READONLY
        self.time = wx.ComboBox(self, choices=choices, style=style)
        self.AddControl(self.time)
        
        text = wx.StaticText(self, label='   Zoom Amplitude: ')
        self.AddControl(text)
        
        choices = ['1', '2', '5', '10', '20']
        style = wx.CB_DROPDOWN | wx.CB_READONLY
        self.amplitude = wx.ComboBox(self, choices=choices, style=style)
        self.AddControl(self.amplitude)
